CPP=cl.exe
LINK=link.exe
OBJS=wave.obj WaveOutDevice.obj
OBJS_PLUGINTEST=plugin.obj WaveOutDevice.obj MidiMsg.obj waveutil.obj MidiMsgList.obj Project.obj Sequence.obj MidiManager.obj Environment.obj MidiDevice.obj
# PROJ=/nologo /EHsc /MT /I /I..\ravi_google\ravi-music /I..\ /c
PROJ=/nologo /EHsc /MT /I..\ /I..\seq /I..\wave /I..\vstplugin /c /w
# PROJ=/nologo /EHsc /MT /Zi /Iseq /Igc /c /Zm512
PROGRAM=wavetest.exe
PROGRAM_PLUGINTEST=plugintest.exe
# PROJ=/nologo /MT /EHsc
# PROJ=/nologo /MT /W3 /Gm /EHsc /Zi /Od

# all : $(PROGRAM) $(PROGRAM_PLUGINTEST)
all : $(PROGRAM)

clean : 
	-@erase WaveOutDevice.obj
	-@erase wave.obj
	-@erase waveutil.obj
	-@erase plugin.obj
	-@erase MidiMsg.obj
	-@erase MidiMsgList.obj
	-@erase Project.obj
	-@erase Sequence.obj
	-@erase MidiManager.obj
	-@erase MidiDevice.obj

WaveOutDevice.obj : WaveOutDevice.h WaveOutDevice.cpp wavedef.h
   $(CPP) $(PROJ) WaveOutDevice.cpp

waveutil.obj : waveutil.h waveutil.cpp wavedef.h
   $(CPP) $(PROJ) waveutil.cpp

wave.obj : wave.cpp
   $(CPP) $(PROJ) wave.cpp

MidiMsg.obj : ../seq/MidiMsg.cpp  ../seq/MidiMsg.h
   $(CPP) $(PROJ) ../seq/MidiMsg.cpp

MidiMsgList.obj : ../seq/MidiMsgList.cpp  ../seq/MidiMsgList.h
   $(CPP) $(PROJ) ../seq/MidiMsgList.cpp

Project.obj : ../seq/Project.cpp  ../seq/Project.h
   $(CPP) $(PROJ) ../seq/Project.cpp

Sequence.obj : ../seq/Sequence.cpp  ../seq/Sequence.h
   $(CPP) $(PROJ) ../seq/Sequence.cpp

MidiManager.obj : ../seq/MidiManager.cpp  ../seq/MidiManager.h
   $(CPP) $(PROJ) ../seq/MidiManager.cpp

Environment.obj : ../seq/Environment.cpp  ../seq/Environment.h
   $(CPP) $(PROJ) ../seq/Environment.cpp

MidiDevice.obj : ../seq/MidiDevice.cpp  ../seq/MidiDevice.h
   $(CPP) $(PROJ) ../seq/MidiDevice.cpp

plugin.obj : plugin.cpp wavedef.h waveutil.h VstPlugin.h WaveOutDevice.h RVstEvents.h VstHost.h
   $(CPP) $(PROJ) plugin.cpp

LINK_FLAG=user32.lib kernel32.lib winmm.lib /NODEFAULTLIB:libc

$(PROGRAM) : $(OBJS)
	$(LINK) $(LINK_FLAG) $(OBJS) /OUT:$(PROGRAM)

$(PROGRAM_PLUGINTEST) : $(OBJS_PLUGINTEST)
	$(LINK) $(LINK_FLAG) $(OBJS_PLUGINTEST) /OUT:$(PROGRAM_PLUGINTEST)
